package com.itc.bi;

import com.itc.bi.config.ConnectionClickHouseConfig;
import com.itc.bi.utils.DruidUtils;
import com.itc.common.security.annotation.EnableBaixunFeignClients;
import com.itc.common.security.annotation.EnableCustomConfig;
import com.itc.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @BelongsProject: itc-airport-cloud
 * @BelongsPackage: com.itc.bi
 * @Author: hecaiy
 * @CreateTime: 2024-06-04  09:48
 * @Description: TODO BI模块启动类
 * @Version: 1.0
 */
@EnableCustomConfig
@EnableCustomSwagger2
@EnableBaixunFeignClients
@SpringBootApplication(scanBasePackages = {"com.itc.bi.*","com.itc.common.**"})
public class BIApplication implements CommandLineRunner {
    @Autowired
    private ConnectionClickHouseConfig connectionClickHouseConfig;
    public static void main(String[] args)
    {
        SpringApplication.run(BIApplication.class, args);
        System.out.println("(♥◠‿◠)ﾉﾞ  BI模块启动成功   ლ(´ڡ`ლ)ﾞ");
    }

    @Override
    public void run(String... args) throws Exception {
        DruidUtils.init(connectionClickHouseConfig);
    }
}
